// see http://vuejs-templates.github.io/webpack for documentation.
var path = require('path')

module.exports = {
    build: {
        env: require('./prod.env'),
        index: path.resolve(__dirname, '../dist/index.html'),
        assetsRoot: path.resolve(__dirname, '../dist'),
        assetsSubDirectory: 'static',
        assetsPublicPath: '../',
        productionSourceMap: true,
        // Gzip off by default as many popular static hosts such as
        // Surge or Netlify already gzip all static assets for you.
        // Before setting to `true`, make sure to:
        // npm install --save-dev compression-webpack-plugin
        productionGzip: false,
        productionGzipExtensions: ['js', 'css']
    },
    dev: {
        env: require('./dev.env'),
        port: 8888,
        autoOpenBrowser: true,
        assetsSubDirectory: 'static',
        assetsPublicPath: '/',
        proxyTable: {
            '/yiyaTest': {
                // target: 'http://106.14.238.126:8101',
                //target: 'http://106.14.97.38',
               //   target: 'http://192.168.10.164:9999',
               target: 'http://47.98.150.186', 
              //  target: 'http://yy.whyiya.com:8070',
              //   target: 'http://211.149.240.223:8070',
                // target:'http://m.beadwallet.com',
                changeOrigin: true,
                pathRewrite: {
                     '^/yiyaTest': '/'
                  //  '^/yiyaTest': '/yiyaTheTest'
                    // '^/webapp': '/webapp'
                }
            }, 
            '/loansupermarket-app': {
                // target: 'http://106.14.238.126:8101',
                //target: 'http://106.14.97.38',
                 target: 'http://192.168.10.164:8060',
               // target: 'http://211.149.240.223:8060',
              //  target: 'http://47.98.150.186:8060', 
                // target:'http://m.beadwallet.com',
                changeOrigin: true,
                pathRewrite: {
                    '^/loansupermarket-app': '/loansupermarket-app'
                    // '^/webapp': '/webapp'
                }
            },
            '/loansupermarket-pay': {
                // target: 'http://106.14.238.126:8101',
                //target: 'http://106.14.97.38',
                target: 'http://211.149.240.223:8065',
                // target:'http://m.beadwallet.com',
                changeOrigin: true,
                pathRewrite: {
                    '^/loansupermarket-pay': '/loansupermarket-pay'
                    // '^/webapp': '/webapp'
                }
            },
            '/loansupermarket-credit': {
                // target: 'http://106.14.238.126:8101',
                //target: 'http://106.14.97.38',
                target: 'http://192.168.10.164:8062',
                // target:'http://m.beadwallet.com',
                changeOrigin: true,
                pathRewrite: {
                    '^/loansupermarket-credit': '/loansupermarket-credit'
                    // '^/webapp': '/webapp'
                }
            },
            '/loansupermarket-user': {
                // target: 'http://106.14.238.126:8101',
                // target: 'http://106.14.97.38',
                target: 'http://192.168.10.164:8067',
                //  target: 'http://47.98.150.186:8067',
                // target:'http://m.beadwallet.com',
                changeOrigin: true,
                pathRewrite: {
                    '^/loansupermarket-app': '/loansupermarket-app'
                    // '^/webapp': '/webapp'
                }
            }

        },
        // CSS Sourcemaps off by default because relative paths are "buggy"
        // with this option, according to the CSS-Loader README
        // (https://github.com/webpack/css-loader#sourcemaps)
        // In our experience, they generally work as expected,
        // just be aware of this issue when enabling this option.
        cssSourceMap: false
    }
}
